<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<!-- layout::Public:top::60 -->
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type='text/javascript' src='__PUBLIC__/JQuery/jquery-1.4.4.js'></script>
        <script type="text/javascript" src="./Public/JQuery/ui/jquery.ui.core.js"></script>
        <script type="text/javascript" src="./Public/JQuery/ui/jquery.effects.core.js"></script>
        <script type="text/javascript" src="./Public/JQuery/ui/jquery.ui.widget.js"></script>
        <script type="text/javascript" src="./Public/JQuery/ui/jquery.ui.button.js"></script>
        <link rel="stylesheet" type="text/css" href="./Public/JQuery/themes/base/jquery.ui.all.css" >
        <script type='text/javascript' src='__PUBLIC__/js/pagecontrol.js'></script>
        <script type='text/javascript' src='__PUBLIC__/js/html.js'></script>
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/grid.css">
        <style type="text/css">
            table tr:even{
                font-size:20px;
            }
        </style>
        <script type="text/javascript">
            perPage = 10;
            page = 1;
            catagory = 0;
            function Catagory(){
                $.post("/TDX/index.php?s=/Fund/jsonGetArticlesPages", {
                    'per':perPage,
                    'catagory':catagory
                }, function(data){
                    total = parseInt(data.data);
                    pageNav.go(1, total);
                }, "json")
            }
            $(document).ready(function(){
                //JQuery
                pageNav.fn = function(p, pn)
                {
                    $.post("/TDX/index.php?s=/Fund/jsonGetArticles", {
                        'per':perPage,
                        'page':page,
                        'catagory':catagory
                    }, function(data){
                        data = data.data;
                        $("#tTemplate").show();
                        var tmp = $("#tTemplate").clone();
                        $("#tBody").children().remove();
                        $("#tBody").append(tmp);
                        for(var i = 0; i < data.length; i++)
                        {
                            var tmp = $("#tTemplate").clone();
                            tmp.find("#tType").text(data[i].cname);
                            tmp.find("#tFileName").text(data[i].name);
                            tmp.attr("index", data[i].catagory);
                            tmp.attr("fid", data[i].ID);
                            tmp.find("#tDate").text(data[i].rtime);
                            tmp.find("#tAuthor").text(data[i].UID);
                            tmp.find("#tType").click(function(){
                                catagory = $(this).parent("tr").attr("index");
                                Catagory();
                            })
                            tmp.find("#tFileName").click(function(){
                                var id = $(this).parent("tr").attr(fid);
                                $.post("/TDX/index.php?s=/Fund/download", {'id':id},function(){});
                            });
                            $("#tBody").append(tmp);
                        }
                        $("#tTemplate").hide();
                    }, "json")
                }
                
            });
        </script>
    </head>
    <body>
        <div class="row">
            <div class="titlecolumn grid_8">
                <p class="smalltitle">基金事务公示</p>
                <table style="text-align:center">
                    <thead>
                        <tr>
                            <th style="width:100px">文件类别</th>
                            <th style="width:200px">文件名</th>
                            <th style="width:150px">发布日期</th>
                            <th style="width:100px">发布人</th>
                        </tr>
                    </thead>
                    <tbody id="tBody">
                        <tr id="tTemplate" index="-1" fid="0">
                            <td style="width:100px"><a href="#" id="tType">文件类别</a></td>
                            <td style="width:200px"><a href="#" id="tFileName">文件名</a></td>
                            <td id="tDate" style="width:150px">发布日期</td>
                            <td id="tAuthor" style="width:100px">发布人</td>
                        </tr>
                    </tbody>
                </table>
                <div id="pageNav"></div>
            </div>
            <div class="titlecolumn grid_4">
                <p class="smalltitle">个人文件</p>
                <ul>
                    <li id="Template"><a href="#">文件名</a></li>
                </ul>
                <div>
                    <p class="smalltitle">请选择要执行的操作</p>

                </div>
            </div>
        </div>
    </body>
    <!-- layout::Public:bottom::60 -->
</html>
